package com.eshop.exception;

import org.springframework.http.HttpStatus;
import com.eshop.api.ApiCode;

public class BadLimitRequestException extends RuntimeException
{
    private Integer status;
    
    public BadLimitRequestException(final String msg) {
        super(msg);
        this.status = ApiCode.BAD_LIMIT_EXCEPTION.getCode();
    }
    
    public BadLimitRequestException(final HttpStatus status, final String msg) {
        super(msg);
        this.status = ApiCode.BAD_LIMIT_EXCEPTION.getCode();
        this.status = status.value();
    }
    
    public Integer getStatus() {
        return this.status;
    }
}
